package com.itshizhan.itjidancideveloper.controller.ucenter;

import com.itshizhan.itjidancideveloper.dao.ArticleCategoryDao;
import com.itshizhan.itjidancideveloper.models.ArticleCategory;
import com.itshizhan.itjidancideveloper.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController()
@RequestMapping("/ucenter/articleCategory")
public class ArticleCategoryController {
	@Autowired
	ArticleCategoryDao articleCategoryDao;

	@GetMapping("/list")
	Response<List<ArticleCategory>> getList() {
		List<ArticleCategory> list = articleCategoryDao.findAll();
		return Response.success(list);
	}
}
